<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>数据网格由表格转换 - jQuery EasyUI 演示</title>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
	<h2 title="Transform DataGrid from Table">数据网格由表格转换</h2>
	<p title="Transform DataGrid from an existing, unformatted html table.">　　数据网格可以从一个已有的非格式化 HTML 表格转换而来。</p>
	<div style="margin:20px 0;">
		<a href="#" class="easyui-linkbutton" onclick="javascript:$('#dg').datagrid({title:'<c>由表格转换而来的数据网格</c>', rownumbers:true})" title="Transform">&nbsp;转换&nbsp;</a>
	</div>
	<table id="dg" style="width:600px;height:auto;border:1px solid #ccc;">
		<thead>
			<tr>
				<th data-options="field:'itemid',halign:'center'"><h title='Item ID'>物料编码</h></th>
				<th data-options="field:'productid',halign:'center'"><h title='Product'>产品</h></th>
				<th data-options="field:'listprice',align:'right',halign:'center'"><h title='List Price'>清单价格</h></th>
				<th data-options="field:'attr1',halign:'center'"><h title='Attribute'>属性</h></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>EST-1</td><td>FI-SW-01 锦鲤</td><td>36.50</td><td>Large 大尾</td>
			</tr>
			<tr>
				<td>EST-10</td><td>K9-DL-01 斑点狗</td><td>18.50</td><td>Spotted Adult Female 成年母</td>
			</tr>
			<tr>
				<td>EST-11</td><td>RP-SN-01 响尾蛇</td><td>28.50</td><td>Venomless 毒少</td>
			</tr>
			<tr>
				<td>EST-12</td><td>RP-SN-01 响尾蛇</td><td>26.50</td><td>Rattleless 声弱</td>
			</tr>
			<tr>
				<td>EST-13</td><td>RP-LI-02 鬣鳞蜥</td><td>35.50</td><td>Green Adult 成年绿</td>
			</tr>
		</tbody>
	</table>
</body>
</html>